O p e n C o m P o r t 
 
 S t o p 
 
 
 
 
 
 L a b e l   O p e n C o m P o r t 
 
 	 S t r i n g     D e v i c e I D   =   " R e c o g n i t i o n " 
 
 	 N u m e r i c   B a u d s         =   1 0 0 0 0 0 0 
 
 	 S t r i n g     C o m P o r t 
 
 	 N u m e r i c   C o m I n d e x 
 
 	 N u m e r i c   C o m R e t r y 1 
 
 	 N u m e r i c   C o m R e t r y 2 
 
 	 F o r   C o m R e t r y 1   =   1   T o   1 0 
 
 	 	 F o r   C o m I n d e x   =   0   T o   G e t S e p a r a t e d S t r i n g C o u n t ( C O M _ P o r t N a m e s )   -   1 
 
 	 	 	 C o m P o r t   =   G e t S e p a r a t e d S t r i n g ( C O M _ P o r t N a m e s ,   C o m I n d e x ) 
 
 	 	 	 C O M   O p e n   C o m P o r t   B a u d s 
 
 	 	 	 I f   C O M _ S t a t u s   =   " O P E N E D " 
 
 	 	 	 	 F o r   C o m R e t r y 2   =   1   T o   3 
 
 	 	 	 	 	 C O M   D i s c a r d O u t B u f f e r 
 
 	 	 	 	 	 C O M   D i s c a r d I n B u f f e r 
 
 	 	 	 	 	 C O M   W r i t e S t r i n g   " G e t I D "   +   C R L F 
 
 	 	 	 	 	 W a i t   S e c o n d s   0 . 0 1 
 
 	 	 	 	 	 I f   C O M _ R e c e i v e U n t i l ( C R L F )   =   D e v i c e I D   +   C R L F 
 
 	 	 	 	 	 	 C o m I n d e x   =   - 1 
 
 	 	 	 	 	 	 B e e p   " 4 4 0 - 1 , 0 - 8 0 , 8 8 0 - 1 " 
 
 	 	 	 	 	 	 s 1   =   C O M _ S t a t u s 
 
 	 	 	 	 	 	 s 1   =   " P o r t   S t a t u s :   "     +   C o m P o r t   +   "   I S   "   +   s 1   +   "   a t   "   +   B a u d s   +   C R L F 
 
 	 	 	 	 	 	 s 1   =   s 1   +   " V a l i d   p o r t s :   "   +   C O M _ P o r t N a m e s   +   C R L F   +   C R L F 
 
 	 	 	 	 	 	 P r i n t   s 1 
 
 	 	 	 	 	 	 R e t u r n 
 
 	 	 	 	 	 E n d I f 
 
 	 	 	 	 N e x t 
 
 	 	 	 E n d I f 
 
 	 	 N e x t 
 
 	 N e x t 
 
 	 I f   C o m I n d e x   > =   0 
 
 	 	 P r i n t   " C O M   P O R T   N O T   F O U N D " 
 
 	 	 T T S   S e l e c t V o i c e   " E N G F " 
 
 	 	 T T S   S p e a k   " C o m   p o r t   n o t   f o u n d . " 
 
 	 	 T T S   S p e a k   " P l e a s e   t e s t   c o n n e c t i o n s   a n d   r e t r y . " 
 
 	 	 W a i t   N o t   T T S s p e a k i n g 
 
 	 	 E n d 
 
 	 E n d I f 
 
 R e t u r n 
 
 
 
 
 
 
 
 
 
 
 
 